#ifndef  _SERVO_H
#define  _SERVO_H
#include "sys.h"
#include "key.h"
#include "led.h"
#include "math.h"
#include "usart.h"
#include "adc.h"
extern u8 get_target;
extern u8 ARM_cho_flag ;
extern u16 now1 ,now2 ,now3 ,now4 ,now5 ,now6 ;//1500,1300,1440,1460,1630,1500)
extern u16 target1,target2,target3,target4,target5,target6;
extern u8  time_1 ,time_2 ,time_3 ,time_4 ,time_5 ,time_7 ,time_6 ;

void set_target_all(int target1,int target2,int target3,int target4,int target5,int target6);
void set_target(u8 i,int target);
void TIM3_4_ARM_int(void);
void arm_4_set(u16 arm0 ,u16 arm1 , u16 arm2 , u16 arm3);
void arm_6_set(u16 arm0 ,u16 arm1 , u16 arm2 , u16 arm3 , u16 arm4 , u16 arm5);
u16 pwm_calm(u16 p0 ,u16 p1 ,u16 t);
void set_angle(u8 i,int now,int target);
void arm_6_set_angle(int arm0 ,int arm1 , int arm2 , int arm3 , int arm4 , int arm5);
u8 Kinematic_Analysis(float x,float y,float Alpha);
void arm_task_ex(u8 i);
void arm_all_work(void* p);
void ARM_cho(u8 i);
#endif